 let urlRoot = '';
 let url=window.location.protocol + '//' + window.location.host;
 if(url.indexOf('localhost')>0){
   url='http://网址'
   urlRoot=url+'/api/v1';
 }else{
  urlRoot = url+'/api/v1';
 }
 window.localStorage["rootUrl"] = urlRoot;
 export const http = {
   class: urlRoot + '/class',
   login: urlRoot + '/login',
   password: urlRoot + '/password',
   logout: urlRoot + '/logout',
   teacher:urlRoot + '/teacher',
   student:urlRoot + '/student',
   grade:urlRoot + '/class/grade',
   term:urlRoot + '/term',
   honor:urlRoot + '/honor',
   announce:urlRoot + '/announce',
   moral:urlRoot + '/moral',
   moral_set:urlRoot + '/moral/set',
   system:urlRoot + '/system',
   signin:urlRoot + '/signin',
   signin_class:urlRoot + '/signin/class',
   course_set:urlRoot + '/course/set',
   lessonTime:urlRoot + '/lessonTime',
   course:urlRoot + '/course',
   exam:urlRoot + '/exam',
   score:urlRoot + '/exam/score',
   mediagroup:urlRoot + '/mediagroup',
   media:urlRoot + '/media',
   importTeacher:urlRoot + '/teacher/import',
   importStudent:urlRoot + '/student/import',
   importExam:urlRoot+'/exam/import',
   url:url
 }
